import request from './request'

// 获取当前用户的慢性病列表
export const getCurrentUserDiseasesApi = () => request.get('/chronic-diseases/current')

// 创建慢性病记录
export const createChronicDiseaseApi = data => request.post('/chronic-diseases', data)

// 更新慢性病记录
export const updateChronicDiseaseApi = (id, data) => request.put(`/chronic-diseases/${id}`, data)

// 删除慢性病记录
export const deleteChronicDiseaseApi = id => request.delete(`/chronic-diseases/${id}`)

// 获取即将随访的慢性病列表
export const getUpcomingFollowUpsApi = () => request.get('/chronic-diseases/upcoming-follow-ups')

// 获取慢性病信息
export const getChronicInfoApi = () => request.get('/chronic-diseases/current')

// 添加或更新慢性病计划
export const addOrUpdateChronicPlanApi = (data) => request.post('/chronic-diseases', data)

// 获取慢性病史
export const getChronicHistoryApi = () => request.get('/chronic-diseases/current')

// 获取慢性病详情
export const getChronicDetailApi = (id) => request.get(`/chronic-diseases/${id}`) 